#include <iostream>
#include <string>
#include <tuple>
// #include <format>

using namespace std;

int main()
{
	//tuple t1{ 16, "Test"s, true };  // Using CTAD
	// Or:
	tuple<int, string, bool> t1{ 16, "Test", true };

	{
		int i{ 0 };
		string str;
		bool b{ false };
		// cout << format("Before: i = {}, str = \"{}\", b = {}", i, str, b) << endl;
	printf("Decomposed: i = %d, str = \"%s\", b = %d\n", i, str.c_str(), b);

		tie(i, str, b) = t1;
		// cout << format("After: i = {}, str = \"{}\", b = {}", i, str, b) << endl;
	printf("Decomposed: i = %d, str = \"%s\", b = %d\n", i, str.c_str(), b);

	}

	{
		int i{ 0 };
		bool b{ false };
		printf("Before: i = %d, b = %d\n", i, b);
		tie(i, std::ignore, b) = t1;
		printf("After: i = %d, b = %d\n", i, b);
	}
}